-- @owner: zhanghuan
-- @date: 2024-6-15
-- @testpoint: count

--step1:建表;expect:成功
drop table if exists t_ustore_ascii_038;
create table t_ustore_ascii_038( COL_1 bigint, COL_2 TIMESTAMP WITHOUT TIME ZONE, COL_3 bool,COL_4 decimal,COL_5 text ,COL_6 smallint ,COL_7 char(30),COL_8 double precision,COL_9 text,COL_10 character varying(30),
COL_11 bool ,COL_12 bytea ,COL_13 real ,COL_14 numeric ,COL_15 blob ,COL_16 integer ,COL_17 int ,COL_18 TIMESTAMP WITH TIME ZONE ,COL_19 binary_integer ,COL_20 interval day to second ,COL_21 boolean, COL_22 nchar(30) ,
COL_23 bigint ,COL_24 nchar(100) ,COL_25 character(1000) , OL_26 text , COL_27 float ,COL_28 double precision ,COL_29 bigint ,COL_30  TIMESTAMP WITH TIME ZONE ,COL_31 TIMESTAMP , COL_32 clob ,COL_33 interval year to month,
COL_34 character(30) ,COL_35 smallint ,COL_36 blob ,COL_37 char(300),COL_38 float ,COL_39 raw(100),COL_40 clob ,COL_41 binary_double ,COL_42 number(6,2) ,COL_43 decimal(6,2) ,COL_44 varchar2(50),COL_45 varchar(30) ,
COL_46 nvarchar2(100), COL_47 numeric(12,6),COL_48 varchar2(50),COL_49 date,COL_50 clob ,COL_51 integer ,COL_52 binary_double ,COL_53 decimal(12,6),COL_54 raw(8000),COL_55 clob ,COL_56 varchar2(8000) ,COL_57 date ,
COL_58 number(12,6),COL_59 nvarchar2(4000) ,COL_60 clob ,COL_61 blob ,COL_62 date ,COL_63 blob , COL_64 varchar(1000),COL_65 date,constraint pk_idassic primary key(COL_1)) with (storage_type=ustore);
--step2:创建序列;expect:成功
drop sequence if exists seq_ustore_ascii_038;
create sequence seq_ustore_ascii_038 increment by 1 start with 100000;
--step3:插入数据;expect:成功
begin for i in 1..1000 loop
insert into t_ustore_ascii_038 values(  seq_ustore_ascii_038.nextval,to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),true,3.1415926+seq_ustore_ascii_038.nextval,
lpad('abc','5000','a@123&^%djgk'),i,lpad('abc','30','@'),i+1.456789445455,lpad('abc','5000','a@123&^%djgk'),
lpad('abc','30','b'),   false,'010101111111100000000000000',3.1415926+seq_ustore_ascii_038.nextval,i/4,'010101111111100000000000000',i,i,to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),
'1',(INTERVAL '4 5:12:10.222' DAY TO SECOND(3)),   0,rpad('abc','30','e'),seq_ustore_ascii_038.nextval,rpad('abc','100','exc'),lpad('abc','1000','a@123&^%djgk'),
lpad('abc','5000','a@123&^%djgk'),i/4,seq_ustore_ascii_038.nextval-99,i*3.1415,to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),
to_timestamp('2019-01-03 14:58:54.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),lpad('abc','5000','a@123&^%djgk'),(INTERVAL '12' YEAR),rpad('abc','30','&'),i,'010101111111100000000000000',
rpad('abc','300','exc'),i/2.15,'0FAADB9',lpad('abc','5000','a@123&^%djgk'),   1.0E+100,3.14+i,i+445.255,rpad('abc','30','&'),lpad('abc','30','&'),rpad('abc','100','&GDsh'),125563.141592,
rpad('abc','30','e'),to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),lpad('abc','5000','a@123汉字&^%djgk'),   seq_ustore_ascii_038.nextval+2,-1.79E+100,98*0.99,'01010',
lpad('abc','5000','a@123&^%djgk'),rpad('abc','8000','a@123&^%djgk'),to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),25563.1415,
lpad('abc','3000','a字符串@123&^%djgk'),lpad('10',2000,'01010'),  '01010',to_timestamp('2019-01-03 14:14:12.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF'),'010101111111100000000000000',
rpad('abc','1000','&GDsh'),to_timestamp('2019-01-03 15:19:00.000000','YYYY-MM-DD HH24:MI:SS.FFFFFF')   );
end loop;
end;
/
--step4:查询;expect:成功
select count(rpad('COL_',5,'1')) from t_ustore_ascii_038 where ASCII(COL_1)>100000;select count(rpad('COL_1',6,'0')) from t_ustore_ascii_038 where ASCII(COL_1)<rpad('10000',6,'2');
select count(rpad('COL_1',6,'5')) from t_ustore_ascii_038 where ASCII(COL_1)=rpad('10000',6,'2');

--step5:清理环境;expect:成功
drop sequence if exists seq_ustore_ascii_038;
drop table if exists t_ustore_ascii_038;




